<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/5/2
  Time: 14:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--解析表达式--%>
<%@ page isELIgnored="false" %>
<%--引入jstl--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--引入springMVC form--%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="page" uri="/xianzhiOA/pageTag" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>编辑项目进度</title>
    <script type="application/javascript">
        function go() {
            if (${schedule.scheduleId!=0}) {
                document.getElementById("scheduleForm").action = "${pageContext.request.contextPath}/Schedule/updateSchedule.emp";
            }
        }
        function ShowPage() {
            window.location.href = "${pageContext.request.contextPath}/Schedule/selScheduleAll.emp";
        }
    </script>
</head>
<body>
<!--头部开始-->
<jsp:include page="headerBack.jsp"></jsp:include>
<!-- 导航 -->
<jsp:include page="leftBack.jsp"></jsp:include>
<!--内容页-->
<div class="main">
    <!--内容页头部-->
    <div class="page-header">
        <div class="pull-left">
            <ol class="breadcrumb visible-sm visible-md visible-lg">
                <li><a href="${pageContext.request.contextPath}/Login/goHomePage"><i class="icon fa fa-home"></i>主页</a></li>
                <li class="active"><i class="fa fa-pencil"></i>基本信息</li>
            </ol>
        </div>
        <div class="pull-right">
            <h2>主页</h2>
        </div>
    </div>
    <div class="row profile">
        <div class="col-lg-11">
            <div class="col-lg-7 col-md-9 col-sm-12">
                <div class="panel">
                    <div class="panel-body">
                        <div class="tabs tabs-warning">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a href="#edit" data-toggle="tab">编辑信息</a>
                                </li>
                            </ul>
                            <div class="tab-content">
                                <div id="edit" class="tab-pane updateProfile active">
                                    <!--form表单-->
                                    <sf:form id="scheduleForm" action="${pageContext.request.contextPath}/Schedule/addSchedule.emp"
                                             modelAttribute="schedule" method="post" class="form-horizontal" >
                                        <div class="bk-bg-white bk-padding-top-10 bk-padding-bottom-10">
                                            <h4>编辑项目进度</h4>
                                            <fieldset>
                                                <div class="form-group">
                                                    <sf:input type="hidden" path="scheduleId"/>
                                                    <sf:input type="hidden" path="EmpId"/>
                                                    <span style="color: red">${msg}</span>
                                                </div>
                                                <div class="form-group">
                                                    <label>所在周期</label><br/>
                                                    <sf:input path="scheduleTime" type="test"  class="sang_Calender"/>
                                                    <span style="color: #ba0000"> ${scheduleTime} </span>
                                                </div>
                                                <div class="form-group">
                                                    <label>归属项目</label><br/>
                                                    <sf:select path="scheduleProject" class="form-control">
                                                            <sf:options items="${projectList}" itemLabel="projectName" itemValue="projectId"></sf:options>
                                                    </sf:select>
                                                </div>
                                                <div class="form-group">
                                                    <label>偏差原因</label><br/>
                                                    <input name="scheduleCause" value="${schedule.scheduleCause}" class="form-control"/>
                                                    <span style="color: #ba0000"> ${errors.scheduleCause} </span>
                                                </div>
                                                <div class="form-group">
                                                    <label>改进措施</label><br/>
                                                    <input name="scheduleImprove" value="${schedule.scheduleImprove}" class="form-control"/>
                                                    <span style="color: #ba0000"> ${errors.scheduleImprove} </span>
                                                </div>
                                            </fieldset>
                                            <div class="bk-bg-white">
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="pull-right">
                                                            <button onclick="go()" type="submit" class="btn btn-primary">提交</button>&nbsp;&nbsp;
                                                            <button type="button" onclick="ShowPage()" class="btn btn-primary">取消</button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </sf:form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/dist/backEnd/js/datetime.js"></script>
</body>
</html>
